import java.awt.desktop.PreferencesEvent;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

public class Main3 {
    public static String reverseVowels(String s) {
        Set<Character> set = new HashSet<>(Arrays.asList('a','e','i','o','u','A','E','I','O','U'));
        char[] ss = s.toCharArray();
        int left = 0;
        int right = ss.length-1;
        while(left < right) {
            while(left < right && !set.contains(ss[left])) {
                left++;
            }
            while(left < right && !set.contains(ss[right])) {
                right--;
            }
            swap(ss,left++,right--);
        }
        return new String(ss);
    }

    private static void swap(char[] ss,int a,int b) {
        char tmp = ss[a];
        ss[a] = ss[b];
        ss[b] = tmp;
    }

    public static void main(String[] args) {
        System.out.println(reverseVowels("IceCreAm"));
    }
}
